import logo from "./logo.svg";
import "./App.css";
import { useState, userEffect } from "react";
// import { icpRanderer } from "electron-ipc-renderer";
// import { icpRanderer } from "electron";
// eslint-disable-next-line no-undef
console.log(NodeAPI.version);

function App() {
  // 获取远程控制码
  const [remoteCode, setRemoteCode] = useState("");
  // 获取本地控制码
  const [localCode, setLocalCode] = useState("");
  // 控制状态文案
  const [controlText, setControlText] = useState(" ");
  return (
    <div className="App">
      {controlText === " " ? (
        <>
          <div>你的控制码是：{localCode}</div>
          <input type="text" value={remoteCode} />
        </>
      ) : (
        <div>{controlText}</div>
      )}
    </div>
  );
}

export default App;
